home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / OPF / OS / FWGraphx / Include / FWWinGDI.h < prev    next >
Encoding:
Text File  |  1994-04-21  |  2.7 KB  |  105 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWWinGDI.h
  4. //    Release Version:    $ 1.0d1 $
  5. //
  6. //    Creation Date:        3/28/94
  7. //
  8. //    Copyright:    © 1993, 1994 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #if defined(FW_BUILD_WIN) && !defined(FWWINGDI_H)
  13. #define FWWINGDI_H
  14.  
  15. #ifndef FWGROBJ_H
  16. #include "FWGrObj.h"
  17. #endif
  18.  
  19. // ----- Windows Includes -----
  20. #ifndef _INC_WINDOWS
  21. #include <Windows.h>
  22. #endif
  23.  
  24. //==============================================================================
  25. //    •• CLASS FW_CWinGDIObjectList
  26. //==============================================================================
  27.  
  28. class FW_CWinGDIObjectList
  29. {
  30. public:
  31.     FW_CWinGDIObjectList();
  32.     virtual ~FW_CWinGDIObjectList();
  33.  
  34.     void AddGDIObject(FW_CWinGDIObjectRep objectRep);
  35.     void RemoveGDIObject(FW_CWinGDIObjectRep objectRep);
  36. };
  37.  
  38. //==============================================================================
  39. //    •• CLASS FW_CWinGDIObject
  40. //==============================================================================
  41.  
  42. class FW_CWinGDIObject : public FW_CGraphicObjectPtr
  43. {
  44. //------------------------------------------------------------------------------
  45. //    • Constructors/Destructors
  46. //
  47. public:
  48.     FW_CWinGDIObject();
  49.     FW_CWinGDIObject(const FW_CWinGDIObject& other);
  50.  
  51. protected:    
  52.     FW_CWinGDIObject(FW_CWinGDIObjectRep* rep);
  53.     
  54. //------------------------------------------------------------------------------
  55. //    • New API
  56. //
  57. public:
  58.     static FW_CWinGDIObject FromHandle(HGDIOBJECT);
  59.  
  60. //------------------------------------------------------------------------------
  61. //    • Data Members
  62. //
  63. private:
  64.     static FW_CWinGDIObjectList    fGDIObjectsList;
  65. };
  66.  
  67. //==============================================================================
  68. //    •• CLASS FW_CWinGDIObjectRep
  69. //==============================================================================
  70.  
  71. class FW_CWinGDIObjectRep : public FW_CGraphicObjectRep
  72. {
  73.  
  74. //------------------------------------------------------------------------------
  75. //    • Constructors/Destructors
  76. //
  77. protected:
  78.     FW_CWinGDIObjectRep();
  79.     FW_CWinGDIObjectRep(HGDIOBJECT hGDIObject, FW_Boolean stockObject = FALSE);
  80.     virtual ~FW_CWinGDIObjectRep();
  81.  
  82. //------------------------------------------------------------------------------
  83. //    • New API
  84. //
  85. public:
  86.     FW_Boolean         IsSelected() const
  87.                         {return fSelected;}
  88.  
  89.     void            SelectObject(FW_CGraphicContext* gc);
  90.     
  91.     HGDIOBJECT        GetGDIObject() const
  92.                         {return fGDIObject;}
  93.     
  94. //------------------------------------------------------------------------------
  95. //    • Data Members
  96. //
  97. private:
  98.     FW_Boolean                fSelected;
  99.     FW_Boolean                fIsTemporary;
  100.     HGDIOBJECT                fGDIObject;
  101.     FW_CWinGDIObject        fPreviousObject;
  102. };
  103.  
  104. #endif
  105.